package creator.factory.origin;

/**
 * @version v1.0
 * @ClassName: Client
 * @Description: TODO(一句话描述该类的功能)
 * @Author: 黑马程序员
 */
public class Client {
    /**
     *  顾客可以去咖啡店和甜品店买咖啡
     *  缺点：咖啡店和甜品店都对咖啡强耦合，如果咖啡店和甜品店有新的咖啡，那么咖啡店和甜品店都要修改代码
     */
    public static void main(String[] args) {
        //1,创建咖啡店类
        CoffeeStore store = new CoffeeStore();
        //2,点咖啡
        Coffee coffee = store.orderCoffee("american");

        System.out.println(coffee.getName());

        //1,创建甜品店类
        DessertStore dessertStore = new DessertStore();
        //2,点咖啡
        Coffee coffee1 = dessertStore.orderCoffee("latte");

        System.out.println(coffee1.getName());
    }
}
